High order R-K method

Maple has many numerical methods available to solve ODEs that can not be solved symbolically. These high order numerical methods quickly find solutions at specific points and return a procedure (function) that will compute the values at given points. The solution procedure can also be plotted. The default high order method used by Maple is a Runge-Kutta Fehlberg method that produces a fourth or fifth order accurate solution.

Here are the steps to use Maple to solve an ODE numerically.

  1. Enter and name the ODEs you want to solve.
  2. Substitute values for any constants.
  3. Execute the dsolve command with the numeric option. Note: Be sure to include the initial condition values or your solution procedure won't work.
      soln := dsolve({odeFxSUBS,f(0)=1},f(x),numeric)

Find the value of your solution at a specific point, by passing a value to your solution procedure.

      soln(15)

Plot the results using the odeplot command. Note: odeplot requires with(plots) if it has not already been executed.

      odeplot(soln,[x,f(x)],x=0..10)

Example code that: Numerically solves a system of ODEs for f(x) and g(x), gets the solution result for x=10, and plots the results.

      soln := dsolve( {odeFxSUBS, odeGxSUBS, icF0, icG0}, {f(x),g(x)}, numeric )
      soln(10)
      with(plots) : odeplot(soln,[[x,f(x)],[x,g(x)]],x=0..10)
      

Maple also has an interactive ODE Analyzer that allows you to modify inputs and resolve the system with any combination of values. See the examples for how to use this powerful tool.